package com.midea.ai.air.ui.more;

import android.app.Dialog;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.midea.ai.air.R;
import com.midea.ai.air.common.BaseActivity;
import com.midea.ai.air.view.MyTitleBar;
import com.midea.ai.air.view.ShareView;

/**
 * Created by hww on 2016/3/29.
 * 更多-空气达人
 */
public class MoreSettingAirExpert extends BaseActivity implements View.OnClickListener {

    private TextView actionbar_left_tv, actionbar_center_tv;
    private ListView listView;
    private Dialog dialog_share;
    private LinearLayout layout_content;

    public static String POSITION = "AIR_EXPERT_POSITION";
    public static String TEMP = "AIR_EXPERT_TEMP";


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_moresettingairexpert);

        init();
    }


    MyTitleBar myTitleBar;
    private RelativeLayout relativeLayoutl;

    private void init() {
//        relativeLayoutl = (RelativeLayout) findViewById(R.id.action_bar_parent);
//        ViewGroup.LayoutParams LP = relativeLayoutl.getLayoutParams();
//        LP.height = Constant.getTopMargin() + getResources().getDimensionPixelSize(R.dimen.height_44dp);
//        relativeLayoutl.setLayoutParams(LP);

        myTitleBar = new MyTitleBar(this);
        myTitleBar.setActionBar_center(R.string.more_setting_air_expert);
        myTitleBar.setActioBar_left(true, R.drawable.register_titler_left, R.string.nav_bar_more);
        myTitleBar.setActionBar_right_iv(true, R.drawable.more_setting_air_expert_right_blue);

        actionbar_left_tv = (TextView) findViewById(R.id.actionbar_tv_left);
        actionbar_left_tv.setTextColor(getResources().getColor(R.color.electric_histogram));

        layout_content = (LinearLayout)findViewById(R.id.layout_content);
    }


    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.actionbar_left_relativeLayout:

                finish();
                break;
            case R.id.actionbar_iv_right:
                ShareView shareView = new ShareView(MoreSettingAirExpert.this);
                shareView.setShareView(layout_content);
                break;
            default:
                break;
        }
    }

}
